<div class="w">
    <ul class="tab">
        <?php if($caseType == 0): ?>
            <li><?php echo $this->Html->link('最新新闻', '/news/index', array('class' => 'on'));?></li>
        <?php else:?>
            <li><?php echo $this->Html->link('最新新闻', '/news/index');?></li>
        <?php endif;?>
        <?php
        foreach ($tabList as $key => $item) {
            $class = '';
            if ($key == $caseType) {
                $class = 'on';
            }
            echo "<li>" . $this->Html->link($item, "/news/index/cate:$key", array('class'=>$class)) . "</li>";
        }
        ?>
    </ul>
    <div class="cont block">
        <?php foreach ($listData as $key => $data):?>
        <?php $row = $data['News']; ?>
        <div class="news-list clearfix">
            <?php
            echo $this->Html->link(
                $this->Html->image('/'.$row['news_icon'], array('width'=>'130','height'=>'90')),
                "/news/view/{$row['id']}/cate:$caseType",
                array('escape' => false)
            );
            ?>
            <h3><?php echo $this->Html->link($row['title'], "/news/view/{$row['id']}/cate:$caseType");?></h3>
            <h4><?php echo $tabList[$row['news_category_id']]?> <?php echo str_replace('-', '.', h($row['release_date']))?> </h4>
            <p><?php echo h($row['news_memo'])?></p>

            <?php echo $this->Html->link("查看详情", "/news/view/{$row['id']}/cate:$caseType", array('class'=>'blue fr'));?>
        </div>
        <?php endforeach; ?>
        <div class="pageBar">
            <?php 
            if ($this->Paginator->hasPrev()) {
                $prevPageUrl = array(
                    'page' => $this->Paginator->current()-1
                ); 
                echo $this->Paginator->link('', $prevPageUrl, array('class'=>'prev-page'));
            } else {
                echo '<a href="#;" class="disabled-prev-page" title="上一页"></a>';
            }

            $paging = $this->Paginator->params();
            $pageCount = $paging['pageCount'];
            foreach (range(1,$pageCount) as $page) {
                $url = array(
                    'page'=>$page
                );
                if ($this->Paginator->current()==$page) {
                    $class = 'pageOn';
                } else {
                    $class = 'page';
                }
                echo $this->Paginator->link($page, $url, array('class'=>$class)); 
            }
            if ($this->Paginator->hasNext()) {
                $nextPageUrl = array(
                    'page' => $this->Paginator->current()+1
                ); 
                echo $this->Paginator->link('', $nextPageUrl, array('class'=>'next-page'));
            } else {
                echo '<a href="#;" class="disabled-next-page" title="下一页"></a>';
            }
            ?>
         </div>
     </div>
</div>
